-- 1d array
local a = {} 	-- new array
for i = 1, 100 do
	a[i] = 0
end
print(#a)
a = {1, 3, 5, 6, 7, 8}

-- 2d array (matrix)
-- method 1: the element is table
local N = 5
local M = 5
local mt = {} 		-- new matrix (NxM)
for i = 1, N do
	local row = {} 	-- new row
	mt[i] = row
	for j = 1, M do
		row[j] = 0
	end
end

-- method 2: 
mt = {}
for i = 1, N do
	local aux = (i - 1) * M
	for j = 1, M do
		mt[aux + j] = 0
	end
end
